package com.leo.entity;

public class ScorePK implements java.io.Serializable{
	//学生
	private Student student;
	//课程ID
	private String courID;
	//学年
	private String schoolYear;
	//学期
	private String term;
	public String getCourID() {
		return courID;
	}
	
	public String getSchoolYear() {
		return schoolYear;
	}
	public String getTerm() {
		return term;
	}
	public void setCourID(String courID) {
		this.courID = courID;
	}
	public void setSchoolYear(String schoolYear) {
		this.schoolYear = schoolYear;
	}

	public void setTerm(String term) {
		this.term = term;
	}
	public Student getStudent() {
		return student;
	}
	public void setStudent(Student student) {
		this.student = student;
	}
	@Override
	public boolean equals(Object obj){
		ScorePK sc = (ScorePK) obj;
		return (this.student.getStuID().equals(sc.student.getStuID()) &&
				this.courID.equals(sc.getCourID()) &&
				this.schoolYear.equals(sc.schoolYear) &&
				this.term.equals(sc.getTerm()) );
		//this.hashCode();
	}
	
	
	@Override
	public int hashCode(){
		return (this.student.getStuID() + '|' + 
				this.courID + '|' + 
				this.schoolYear + '|' + 
				this.term).hashCode();
	}
	
	
}
